home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ccccpppprrrroooodddd1111dddd,,,,zzzzpppprrrroooodddd1111dddd((((3333FFFF)))) ccccpppprrrroooodddd1111dddd,,,,zzzzpppprrrroooodddd1111dddd((((3333FFFF))))
-
-
-
- NNNNAAAAMMMMEEEE
- ccccpppprrrroooodddd1111dddd,,,, zzzzpppprrrroooodddd1111dddd ---- Compute the product of a 1D Fourier transform with a
- 1D filter.
-
- SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
- _F_o_r_t_r_a_n :
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccpppprrrroooodddd1111dddd(((( nnnn,,,,aaaarrrrrrrraaaayyyy,,,,iiiinnnnccccaaaa,,,,ffffiiiilllltttteeeerrrr,,,,iiiinnnnccccffff))))
- iiiinnnntttteeeeggggeeeerrrr nnnn,,,, iiiinnnnccccaaaa,,,, iiiinnnnccccffff
- ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((0000::::((((nnnn----1111))))****iiiinnnnccccaaaa)))),,,, ffffiiiilllltttteeeerrrr((((0000::::((((nnnn----1111))))****iiiinnnnccccffff))))
-
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzpppprrrroooodddd1111dddd(((( nnnn,,,,pppp,,,,aaaarrrrrrrraaaayyyy,,,,iiiinnnnccccaaaa,,,,ffffiiiilllltttteeeerrrr,,,,iiiinnnnccccffff))))
- iiiinnnntttteeeeggggeeeerrrr nnnn,,,, iiiinnnnccccaaaa,,,, iiiinnnnccccffff
- ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((0000::::((((nnnn----1111))))****iiiinnnnccccaaaa)))),,,,
- ffffiiiilllltttteeeerrrr((((0000::::((((nnnn----1111))))****iiiinnnnccccffff))))
-
-
- _C :
- ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
- iiiinnnntttt ccccpppprrrroooodddd1111dddd((((iiiinnnntttt nnnn,,,, ccccoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,, iiiinnnntttt iiiinnnncccc,,,,
- ccccoooommmmpppplllleeeexxxx ****ffffiiiilllltttteeeerrrr,,,, iiiinnnntttt iiiinnnnccccffff))));;;;
- iiiinnnntttt zzzzpppprrrroooodddd1111dddd((((iiiinnnntttt nnnn,,,, zzzzoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt iiiinnnncccc,,,,
- zzzzoooommmmpppplllleeeexxxx ****ffffiiiilllltttteeeerrrr,,,, iiiinnnntttt iiiinnnnccccffff))));;;;
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- ccccpppprrrroooodddd1111dddd and zzzzpppprrrroooodddd1111dddd compute the product of the Fourier transforms of a
- complex sequence of N samples with the Fourier transforms of a complex
- filter.
- Note, the product of the Fourier transforms of two sequences is equal to
- the Fourier transform of their convolution.
-
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- NNNN ---- Integer, the number of samples in each sequence.
- Unchanged on exit.
-
- AAAARRRRRRRRAAAAYYYY ---- Array containing the Fourier Transform. On exit, the array is
- overwritten by the product.
-
- IIIINNNNCCCCAAAA ---- Integer, increment between two consecutive elements of the
- sequence. Unchanged on exit.
-
- FFFFIIIILLLLTTTTEEEERRRR ---- Array containing the Fourier Transform of the filter. Unchanged
- on exit.
-
- IIIINNNNCCCCFFFF ---- Integer, increment between two consecutive elements of the filter.
- Unchanged on exit.
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ccccpppprrrroooodddd1111dddd,,,,zzzzpppprrrroooodddd1111dddd((((3333FFFF)))) ccccpppprrrroooodddd1111dddd,,,,zzzzpppprrrroooodddd1111dddd((((3333FFFF))))
-
-
-
- Example of Calling Sequence
- Working on a sequence of 1024 complex values. We successively apply a
- Direct Fourier Transform, the product with a filter transform, then an
- Inverse Fourier Transform-
- Elements of each sequence are stored with increment (stride)1.
- _F_o_r_t_r_a_n
- complex array(0:1024-1), filter(0:1024-1),
- coeff(1024+15)
- call cfft1di( 1024, coeff)
- call cfft1d( -1, 1024, array, 1, coeff)
- ccccaaaallllllll ccccpppprrrroooodddd1111dddd(((( 1111000022224444,,,, aaaarrrrrrrraaaayyyy,,,, 1111,,,, ffffiiiilllltttteeeerrrr,,,,
- call cfft1d( 1, 1024, array, 1, coeff)
-
- _C
- #include <fft.h>
- complex array[1024], filter[1024], *coeff;
- coeff = cfft1di( 1024, NULL);
- cfft1d( -1, 1024, array, 1, coeff);
- ccccpppprrrroooodddd1111dddd(((( 1111000022224444,,,, aaaarrrrrrrraaaayyyy,,,, 1111,,,, ffffiiiilllltttteeeerrrr,,,, 1111))));;;;
- cfft1d( -1, 1024, array, 1, coeff);
-
- NNNNOOOOTTTTEEEE :::: As the FFTs are not normalized, a successive direct, then inverse
- transform, scales the original input by the size of the sequence. Rather
- than calling cscal1d or zscal1d to scale back the result, this scaling
- factor could be directly applied to the filter transform, thus saving
- some extra work.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fft, cfft1di, zfft1di, cfft1d, zfft1d, cscal1d, zscal1d
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-